<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello js</title>
    <script>
        alert("hello!");
        function displayDate() {
            document.getElementById("demo").innerHTML = Date();
        }

    </script>
</head>
<body>
<h1>这是第一个js测试程序</h1>
<p id="demo">这是段落</p>
<button type="button" onclick="displayDate()">显示日期</button>
</body>
</html>